import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class TestBigDecima {
//    public static void main(String[] args) throws Exception {
//        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"classpath:consumer.xml"});
//        context.start();
//        DemoService demoService = (DemoService)context.getBean("demoService"); // 获取远程服务代理
//        String hello = demoService.sayHello("world---------"); // 执行远程方法
//        System.out.println( hello ); // 显示调用结果
//    }

    public static void main(String[] args) {


        System.out.println(new BigDecimal(1404).divide(BigDecimal.valueOf(new Integer(36).intValue()), 1, BigDecimal.ROUND_HALF_DOWN));
    }
}

//-Xms10240000 -Xmx10240000 -XX:+HeapDumpOnOutOfMemoryError


/*
Heap dump file created [13266105 bytes in 0.059 secs]
Heap dump file created [136742124 bytes in 0.059 secs]
        Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:3210)
        at java.util.Arrays.copyOf(Arrays.java:3181)
        at java.util.ArrayList.grow(ArrayList.java:265)
        at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:239)
        at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:231)
        at java.util.ArrayList.add(ArrayList.java:462)
        at Consumer.main(Consumer.java:26)
        */
